package com.chinemit.cui.components.container.group
{
	import com.greensock.TweenLite;
	import com.chinemit.cui.components.core.CUIComponent;
	
	import flash.display.Sprite;
	
	public class DataGroup extends CUIComponent
	{
		protected var canvasWidth:Number;  //画布宽度
		protected var canvasHeight:Number; //画布高度
		
		protected var _horizontalGap:Number = 0; //水平方向间距 
		protected var _verticalGap:Number = 0;   //垂直方向间距
		/**
		 * tile Item Render 
		 */		
		protected var itemRenderClass:Class;
		
		protected var _data:Array;//Tile Item数据 
		
		protected var containerMask:Sprite;//容器MASK
		
		protected var currentPage:Sprite;//当前页面容器
		
		protected var tileWidth:Number=0; // tile宽度
		protected var tileHeight:Number=0;// tile高度  
		
		public function DataGroup(_data:Array,_itemRenderer:Class,_w:Number,_h:Number)
		{
			super();
			this.canvasWidth = _w;
			this.canvasHeight = _h;
			initMask();
			this.itemRenderClass = _itemRenderer;
			this.data = _data;
			
		}

		public function get data():Array
		{
			return _data;
		}

		public function set data(value:Array):void
		{
			_data = value;
		}

		public function get verticalGap():Number
		{
			return _verticalGap;
		}

		public function set verticalGap(value:Number):void
		{
			_verticalGap = value;
		}

		public function get horizontalGap():Number
		{
			return _horizontalGap;
		}

		public function set horizontalGap(value:Number):void
		{
			_horizontalGap = value;
		}
		
		/**
		 * 初始化遮罩 
		 * 
		 */		
		protected function initMask():void{
			containerMask = new Sprite();
			containerMask.graphics.beginFill(0xffffff,0.1);
			containerMask.graphics.drawRect(0,0,canvasWidth,canvasHeight);
			containerMask.graphics.endFill();
			this.addChild(containerMask);
			this.mask = containerMask;
		}
		
		/**
		 * 刷新 
		 */		
		protected function refurbish():void{
			
		}
	}
}